package com.sora.sora.manager.service.impl;

import com.sora.sora.manager.mapper.SysImgMapper;
import com.sora.sora.manager.service.SysImgService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.LinkedList;
import java.util.List;

@Service("sysImgService")
public class SysImgServiceImpl implements SysImgService {

    @Resource
    SysImgMapper sysImgMapper;

    @Override
    public List<Integer> deletedImg(int[] imgIds) {
        List<Integer> result = new LinkedList<>();
        for (int id : imgIds) {
            if (sysImgMapper.deleteImg(id) <= 0) {
                result.add(id);
            }
        }
        return result;
    }
}
